<?php 
/**
* @author Oliver Leisalu, Inditel Meedia
* @package DomFg
* @subpackage Input
*/
class DomFgMultiSelect extends DomFgSelect {
	
	public function __construct( $name = NULL, array $values = array(), array $selected = array() ) {
		parent::__construct( $name, $values, $selected );
	}
	
	public function selected( array $selected ) {
		$this->selected = $selected;
		return $this;
	}
	
	public static function parsePost( $name, &$value ) {
		return (array)$value;
	}
	
	public function render() {
		$this->values = self::parseArrayInput( $this->values, $this->selected, $this->property, $this->keyProperty );
		
		$renderer = $this->getRenderer();
		$renderer->assign('input', $this );
		return $renderer->fetch('Input/MultiSelect.html');
	}
	

}
?>